package com.brillilab.service.module.message.template.impl.experiment;

import com.brillilab.service.module.message.template.AbstractMessageTemplate;
import com.brillilab.service.module.message.template.enums.MessageTypeEnum;
import lombok.Data;

/**
 * @author zlb
 * @Title: CheckExperimentAccordExpectTemp
 * @ProjectName brill_lab
 * @Description: 检测实验完成且符合预期-模板
 * @date 2019/5/28 9:55
 */
@Data
public class CheckExperimentAccordExpectTemp extends AbstractMessageTemplate {
    private String executor;
    private String topicName;
    private String targetName;

    /**
     * 检测实验完成且符合预期
     *
     * @param labId       实验室ID
     * @param receiverId  接收人ID
     * @param labMemberId 接收者实验室成员Id
     * @param executor    执行人
     * @param topicName   课题名称
     * @param targetName  实验目标名称
     * @param referId     业务关联ID
     */
    public CheckExperimentAccordExpectTemp(Long labId, Long receiverId, Long labMemberId, String executor, String topicName, String targetName, Long referId) {
        super(labId, receiverId);
        super.setType(MessageTypeEnum.CheckExperimentAccordExpect.getValue());
        super.setTitle("有检测实验已经完成");
        String content = String.format("<span style='color:#F6AC2D'>%s</span><span>已完成</span>" +
                "<span style='color:#F6AC2D'>%s</span><span>中的</span>" +
                "<span style='color:#F6AC2D'>%s</span>", executor, topicName, targetName);
        super.setContent(content);
        super.setAppContent(String.format("%s已完成%s中的%s", executor, topicName, targetName));
        this.labMemberId = labMemberId;
        this.executor = executor;
        this.topicName = topicName;
        this.targetName = targetName;
        this.referId = referId;
    }

}
